/**
 * Desenvolvido pela Fábrica de Software do CESUPA.
 * Todos os direitos reservados.
 */
package br.cesupa.fabsoft.nomedoprojeto.system.application.beans;

import br.cesupa.fabsoft.nomedoprojeto.system.application.ApplicationConfiguration;
import br.cesupa.fabsoft.nomedoprojeto.system.application.ApplicationDefaults;
import br.cesupa.fabsoft.nomedoprojeto.system.application.facades.ApplicationFacade;

/**
 *
 * @author Breno Leite
 */
public class ApplicationBean {

    private ApplicationConfiguration applicationConfiguration;

    public ApplicationBean() {
        if (applicationConfiguration == null) {
            applicationConfiguration = ApplicationDefaults.getDefaultApplicationConfiguration();
        }
    }

    /**
     * Retrieves the current instance of this bean been managed by the Java
     * Server faces.
     *
     * @return the current instance of this bean
     */
    public static ApplicationBean getCurrentInstance() {
        return (ApplicationBean) ApplicationFacade.getManagedBeanFacade().
                getManagedBeanCurrentInstance("applicationBean");
    }

    /**
     * @return the applicationConfiguration
     */
    public ApplicationConfiguration getApplicationConfiguration() {
        return applicationConfiguration;
    }
}
